
img_url = "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1203822861,3935498037&fm=26&gp=0.jpg"

# urllib
# from urllib import request
# res=request.urlopen(img_url)
# img_data=res.read()
# print(img_data)
# with open("urllib_get.jpg","wb") as f:
#     f.write(img_data)

# urllib3
# import urllib3
# http=urllib3.PoolManager()
# res=http.request("GET",img_url)
# img_data=res.data
# print(img_data)
# with open("urllib3_get.jpg","wb") as f:
#     f.write(img_data)

import requests
res=requests.get(img_url)
img_data=res.content
with open("图片/requsets_get.jpg","wb") as f:
    f.write(img_data)